


<!DOCTYPE html>

<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

    <title>CVX Users’ Guide &#8212; CVX Users&#39; Guide</title>
    <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="_static/cloud.css" />
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noticia+Text:400,i,b,bi|Open+Sans:400,i,b,bi|Roboto+Mono:400,i,b,bi&amp;display=swap" type="text/css" />
    
    <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
    <script src="_static/jquery.js"></script>
    <script src="_static/underscore.js"></script>
    <script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
    <script src="_static/doctools.js"></script>

    
    
     
        <script src="_static/jquery.cookie.js"></script>
    

    
     
        <script src="_static/cloud.base.js"></script>
    

    
     
        <script src="_static/cloud.js"></script>
    

    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Introduction" href="intro.html" /> 
        <meta name="viewport" content="width=device-width, initial-scale=1">
  </head><body>
    <div class="relbar-top">
        
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="intro.html" title="Introduction"
             accesskey="N">next</a> &nbsp; &nbsp;</li>
    <li><a href="#">CVX Users&#39; Guide</a> &#187;</li>

        <li class="nav-item nav-item-this"><a href="">CVX Users’ Guide</a></li> 
      </ul>
    </div>
    </div>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="cvx-users-guide">
<h1>CVX Users’ Guide<a class="headerlink" href="#cvx-users-guide" title="Permalink to this heading">¶</a></h1>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction</a><ul>
<li class="toctree-l2"><a class="reference internal" href="intro.html#what-is-cvx">What is CVX?</a><ul>
<li class="toctree-l3"><a class="reference internal" href="intro.html#what-s-new">What’s new?</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="intro.html#what-is-disciplined-convex-programming">What is disciplined convex programming?</a><ul>
<li class="toctree-l3"><a class="reference internal" href="intro.html#mixed-integer-problems">Mixed integer problems</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="intro.html#what-cvx-is-not">What CVX is <em>not</em></a></li>
<li class="toctree-l2"><a class="reference internal" href="intro.html#licensing">Licensing</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="install.html#supported-platforms">Supported platforms</a></li>
<li class="toctree-l2"><a class="reference internal" href="install.html#installing-a-cvx-professional-license">Installing a CVX Professional license</a></li>
<li class="toctree-l2"><a class="reference internal" href="install.html#solvers-included-with-cvx">Solvers included with CVX</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">A quick start</a><ul>
<li class="toctree-l2"><a class="reference internal" href="quickstart.html#least-squares">Least squares</a></li>
<li class="toctree-l2"><a class="reference internal" href="quickstart.html#bound-constrained-least-squares">Bound-constrained least squares</a></li>
<li class="toctree-l2"><a class="reference internal" href="quickstart.html#other-norms-and-functions">Other norms and functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="quickstart.html#other-constraints">Other constraints</a></li>
<li class="toctree-l2"><a class="reference internal" href="quickstart.html#an-optimal-trade-off-curve">An optimal trade-off curve</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="basics.html">The Basics</a><ul>
<li class="toctree-l2"><a class="reference internal" href="basics.html#cvx-begin-and-cvx-end"><code class="docutils literal notranslate"><span class="pre">cvx_begin</span></code> and <code class="docutils literal notranslate"><span class="pre">cvx_end</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="basics.html#variables">Variables</a></li>
<li class="toctree-l2"><a class="reference internal" href="basics.html#objective-functions">Objective functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="basics.html#constraints">Constraints</a></li>
<li class="toctree-l2"><a class="reference internal" href="basics.html#functions">Functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="basics.html#set-membership">Set membership</a></li>
<li class="toctree-l2"><a class="reference internal" href="basics.html#dual-variables">Dual variables</a></li>
<li class="toctree-l2"><a class="reference internal" href="basics.html#assignment-and-expression-holders">Assignment and expression holders</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="dcp.html">The DCP ruleset</a><ul>
<li class="toctree-l2"><a class="reference internal" href="dcp.html#a-taxonomy-of-curvature">A taxonomy of curvature</a></li>
<li class="toctree-l2"><a class="reference internal" href="dcp.html#top-level-rules">Top-level rules</a></li>
<li class="toctree-l2"><a class="reference internal" href="dcp.html#constraints">Constraints</a><ul>
<li class="toctree-l3"><a class="reference internal" href="dcp.html#strict-inequalities">Strict inequalities</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="dcp.html#expression-rules">Expression rules</a></li>
<li class="toctree-l2"><a class="reference internal" href="dcp.html#functions">Functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="dcp.html#compositions">Compositions</a></li>
<li class="toctree-l2"><a class="reference internal" href="dcp.html#monotonicity-in-nonlinear-compositions">Monotonicity in nonlinear compositions</a></li>
<li class="toctree-l2"><a class="reference internal" href="dcp.html#scalar-quadratic-forms">Scalar quadratic forms</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="sdp.html">Semidefinite programming mode</a></li>
<li class="toctree-l1"><a class="reference internal" href="gp.html">Geometric programming mode</a><ul>
<li class="toctree-l2"><a class="reference internal" href="gp.html#top-level-rules">Top-level rules</a></li>
<li class="toctree-l2"><a class="reference internal" href="gp.html#constraints">Constraints</a></li>
<li class="toctree-l2"><a class="reference internal" href="gp.html#expressions">Expressions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="solver.html">Solvers</a><ul>
<li class="toctree-l2"><a class="reference internal" href="solver.html#supported-solvers">Supported solvers</a></li>
<li class="toctree-l2"><a class="reference internal" href="solver.html#selecting-a-solver">Selecting a solver</a></li>
<li class="toctree-l2"><a class="reference internal" href="solver.html#controlling-screen-output">Controlling screen output</a></li>
<li class="toctree-l2"><a class="reference internal" href="solver.html#interpreting-the-results">Interpreting the results</a></li>
<li class="toctree-l2"><a class="reference internal" href="solver.html#controlling-precision">Controlling precision</a></li>
<li class="toctree-l2"><a class="reference internal" href="solver.html#advanced-solver-settings">Advanced solver settings</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="funcref.html">Reference guide</a><ul>
<li class="toctree-l2"><a class="reference internal" href="funcref.html#arithmetic-operators">Arithmetic operators</a></li>
<li class="toctree-l2"><a class="reference internal" href="funcref.html#built-in-functions">Built-in functions</a><ul>
<li class="toctree-l3"><a class="reference internal" href="funcref.html#linear">Linear</a></li>
<li class="toctree-l3"><a class="reference internal" href="funcref.html#nonlinear">Nonlinear</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="funcref.html#new-functions">New functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="funcref.html#sets">Sets</a></li>
<li class="toctree-l2"><a class="reference internal" href="funcref.html#commands">Commands</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="support.html">Support</a><ul>
<li class="toctree-l2"><a class="reference internal" href="support.html#the-cvx-forum">The CVX Forum</a></li>
<li class="toctree-l2"><a class="reference internal" href="support.html#bug-reports">Bug reports</a></li>
<li class="toctree-l2"><a class="reference internal" href="support.html#what-is-a-bug">What <em>is</em> a bug?</a></li>
<li class="toctree-l2"><a class="reference internal" href="support.html#handling-numerical-issues">Handling numerical issues</a></li>
<li class="toctree-l2"><a class="reference internal" href="support.html#cvx-professional-support">CVX Professional support</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="advanced.html">Advanced topics</a><ul>
<li class="toctree-l2"><a class="reference internal" href="advanced.html#eliminating-quadratic-forms">Eliminating quadratic forms</a></li>
<li class="toctree-l2"><a class="reference internal" href="advanced.html#indexed-dual-variables">Indexed dual variables</a></li>
<li class="toctree-l2"><a class="reference internal" href="advanced.html#the-successive-approximation-method">The successive approximation method</a><ul>
<li class="toctree-l3"><a class="reference internal" href="advanced.html#suppressing-the-warning">Suppressing the warning</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="advanced.html#power-functions-and-p-norms">Power functions and p-norms</a></li>
<li class="toctree-l2"><a class="reference internal" href="advanced.html#overdetermined-problems">Overdetermined problems</a></li>
<li class="toctree-l2"><a class="reference internal" href="advanced.html#adding-new-functions-to-the-atom-library">Adding new functions to the atom library</a><ul>
<li class="toctree-l3"><a class="reference internal" href="advanced.html#new-functions-via-the-dcp-ruleset">New functions via the DCP ruleset</a></li>
<li class="toctree-l3"><a class="reference internal" href="advanced.html#new-functions-via-partially-specified-problems">New functions via partially specified problems</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a><ul>
<li class="toctree-l2"><a class="reference internal" href="license.html#cvx-professional-license">CVX Professional License</a></li>
<li class="toctree-l2"><a class="reference internal" href="license.html#cvx-standard-license">CVX Standard License</a></li>
<li class="toctree-l2"><a class="reference internal" href="license.html#the-free-solver-clause">The Free Solver Clause</a></li>
<li class="toctree-l2"><a class="reference internal" href="license.html#bundled-solvers">Bundled solvers</a></li>
<li class="toctree-l2"><a class="reference internal" href="license.html#example-library">Example library</a></li>
<li class="toctree-l2"><a class="reference internal" href="license.html#no-warranty">No Warranty</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="citing.html">Citing CVX</a></li>
<li class="toctree-l1"><a class="reference internal" href="credits.html">Credits and Acknowledgements</a></li>
<li class="toctree-l1"><a class="reference internal" href="gurobi.html">Using Gurobi with CVX</a><ul>
<li class="toctree-l2"><a class="reference internal" href="gurobi.html#about-gurobi">About Gurobi</a></li>
<li class="toctree-l2"><a class="reference internal" href="gurobi.html#gurobilic">Using Gurobi with CVX</a></li>
<li class="toctree-l2"><a class="reference internal" href="gurobi.html#selecting-gurobi-as-your-default-solver">Selecting Gurobi as your default solver</a></li>
<li class="toctree-l2"><a class="reference internal" href="gurobi.html#obtaining-support-for-cvx-and-gurobi">Obtaining support for CVX and Gurobi</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="mosek.html">Using MOSEK with CVX</a><ul>
<li class="toctree-l2"><a class="reference internal" href="mosek.html#about-mosek">About MOSEK</a></li>
<li class="toctree-l2"><a class="reference internal" href="mosek.html#id1">Using MOSEK with CVX</a></li>
<li class="toctree-l2"><a class="reference internal" href="mosek.html#selecting-mosek-as-your-default-solver">Selecting MOSEK as your default solver</a></li>
<li class="toctree-l2"><a class="reference internal" href="mosek.html#obtaining-support-for-cvx-and-mosek">Obtaining support for CVX and MOSEK</a></li>
</ul>
</li>
</ul>
</div>
</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
        <p class="logo"><a href="#" title="index">
          <img class="logo" src="_static/cvxrlogo.png" alt="Logo"/>
        </a></p>
  <div class="sphinxnext">
    <h4>Next page</h4>
    <p class="topless"><a href="intro.html"
                          title="Next page">&rarr; Introduction</a></p>
  </div>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/index.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div><h3>Other links</h3>
<ul class="this-page-menu">
<li><a href="CVX.pdf" target="_blank">Download the PDF</a></li>
<li><a href="http://cvxr.com/cvx">CVX home page</a></li>
</ul>


<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
        </div>
      </div>
    
    
        <div class="sidebar-toggle-group no-js">
            
            <button class="sidebar-toggle" id="sidebar-hide" title="Hide the sidebar menu">
                 «
                <span class="show-for-small">hide menu</span>
                
            </button>
            <button class="sidebar-toggle" id="sidebar-show" title="Show the sidebar menu">
                
                <span class="show-for-small">menu</span>
                <span class="hide-for-small">sidebar</span>
                 »
            </button>
        </div>
    
      <div class="clearer"></div>
    </div>
    <div class="relbar-bottom">
        
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="intro.html" title="Introduction"
             >next</a> &nbsp; &nbsp;</li>
    <li><a href="#">CVX Users&#39; Guide</a> &#187;</li>

        <li class="nav-item nav-item-this"><a href="">CVX Users’ Guide</a></li> 
      </ul>
    </div>
    </div>

    <div class="footer" role="contentinfo">
        &#169; Copyright © 2012, CVX Research, Inc..
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.0.2.
    </div>
    <!-- cloud_sptheme 1.4 -->
  </body>
</html>